﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Example10.aspx.cs" Inherits="Chapter11.Example10" %>

<!DOCTYPE html>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>代码清单 11-10 使用 headers 属性</title>
    <meta name="author" content="Adam Freeman" />
    <meta name="description" content="A simple example" />
    <link rel="shortcut icon" href="Example01.Favicon.ico" type="image/x-ico" />
    <style>
        thead th, tfoot th {
            text-align: left;
            background: grey;
            color: white;
        }

        tbody th {
            text-align: right;
            background: lightgrey;
            color: grey;
        }

        thead [colspan], tfoot [colspan] {
            text-align: center;
        }
    </style>
</head>
<body>
    <form>
        <div>
            <table>
                <thead>
                    <tr>
                        <th id="rank">Rank</th>
                        <th id="name">Name</th>
                        <th id="color">Color</th>
                        <th id="sizeAndVotes" colspan="2">Size & Votes</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <th id="first" headers="rank">Favorite:</th>
                        <td headers="name first">Apples</td>
                        <td headers="color first">Green</td>
                        <td headers="sizeAndVote first">Medium</td>
                        <td headers="sizeAndVote first">500</td>
                    </tr>
                    <tr>
                        <th id="second" headers="rank">2nd Favorite:</th>
                        <td headers="name second">Oranges</td>
                        <td headers="color second">Orange</td>
                        <td headers="sizeAndVote second">Large</td>
                        <td headers="sizeAndVote second">450</td>
                    </tr>
                </tbody>
                <tfoot>
                    <tr>
                        <th colspan="5">&copy; 2011 Adam Freeman Fruit Data Enterprises</th>
                    </tr>
                </tfoot>
            </table>
        </div>
    </form>
</body>
</html>
